#!/bin/sh

# this export is requiered for i3 handle this script with its bindsym
export PATH=$HOME/.scripts/i3color_schemes:$PATH

polybar_pid=$(pgrep polybar)

if [ ! -z $polybar_pid ]
then
	kill $polybar_pid
fi

choose=$(ls ~/.config/i3/themes | dmenu -l $(ls ~/.config/i3/themes | wc -l))

cat ~/.config/i3/common ~/.config/i3/themes/$choose > ~/.config/i3/config
#cp ~/.config/i3/color-schemes/$choose ~/.config/i3/config
i3-msg restart >> /dev/null
